package com.yuanheng100.ems4j.service;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 启动服务类
 *
 * Created by wangguangshuo on 2016/12/14.
 */
public class Ems4jLauncher {

    private static ClassPathXmlApplicationContext ctx_producer = null;

    public static void init() {
        // 初始化
        if(ctx_producer == null) {
            ctx_producer = new ClassPathXmlApplicationContext(new String[]{"spring/applicationContext-root.xml" });
            ctx_producer.start();
        }

    }

    public static void main(String[] args) {
        init();
        try {
            while (true) {
                Thread.sleep(1000);
            }
        } catch (InterruptedException e) {
        }
    }

}
